home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cato / Xm / Uil.z / Uil
Encoding:
Text File  |  2002-10-03  |  16.7 KB  |  331 lines

  1.  
  2.  
  3.  
  4.      UUUUiiiillll((((3333XXXX))))                   UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV                   UUUUiiiillll((((3333XXXX))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           UUUUiiiillll - Invokes the UIL compiler from within an application
  10.  
  11.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.           ####iiiinnnncccclllluuuuddddeeee <<<<uuuuiiiillll////UUUUiiiillllDDDDeeeeffff....hhhh>>>>
  13.  
  14.           UUUUiiiillll____ssssttttaaaattttuuuussss____ttttyyyyppppeeee UUUUiiiillll ((((_c_o_m_m_a_n_d__d_e_s_c, _c_o_m_p_i_l_e__d_e_s_c, _m_e_s_s_a_g_e__c_b,
  15.                     _m_e_s_s_a_g_e__d_a_t_a, _s_t_a_t_u_s__c_b, _s_t_a_t_u_s__d_a_t_a))))
  16.                UUUUiiiillll____ccccoooommmmmmmmaaaannnndddd____ttttyyyyppppeeee    *_c_o_m_m_a_n_d__d_e_s_c;;;;
  17.                UUUUiiiillll____ccccoooommmmppppiiiilllleeee____ddddeeeesssscccc____ttttyyyyppppeeee*_c_o_m_p_i_l_e__d_e_s_c;;;;
  18.                UUUUiiiillll____ccccoooonnnnttttiiiinnnnuuuueeee____ttttyyyyppppeeee   ((((*_m_e_s_s_a_g_e__c_b)))) (((())));;;;
  19.                cccchhhhaaaarrrr                *_m_e_s_s_a_g_e__d_a_t_a;;;;
  20.                UUUUiiiillll____ccccoooonnnnttttiiiinnnnuuuueeee____ttttyyyyppppeeee   ((((*_s_t_a_t_u_s__c_b)))) (((())));;;;
  21.                cccchhhhaaaarrrr                *_s_t_a_t_u_s__d_a_t_a;;;;
  22.  
  23.  
  24.      VVVVEEEERRRRSSSSIIIIOOOONNNN
  25.           This page documents version 1.2 of the Motif library.
  26.  
  27.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  28.           The UUUUiiiillll function provides a callable entry point for the UIL
  29.           compiler. The UUUUiiiillll callable interface can be used to process
  30.           a UIL source file and to generate UID files, as well as
  31.           return a detailed description of the UIL source module in
  32.           the form of a symbol table (parse tree).
  33.  
  34.  
  35.           _c_o_m_m_a_n_d__d_e_s_c        Specifies the uuuuiiiillll command line.
  36.  
  37.           _c_o_m_p_i_l_e__d_e_s_c        Returns the results of the compilation.
  38.  
  39.           _m_e_s_s_a_g_e__c_b          Specifies a callback function that is
  40.                               called when the compiler encounters
  41.                               errors in the UIL source.
  42.  
  43.           _m_e_s_s_a_g_e__d_a_t_a        Specifies user data that is passed to
  44.                               the message callback function
  45.                               (message_cb). Note that this argument is
  46.                               not interpreted by UIL, and is used
  47.                               exclusively by the calling application.
  48.  
  49.           _s_t_a_t_u_s__c_b           Specifies a callback function that is
  50.                               called to allow X applications to
  51.                               service X events such as updating the
  52.                               screen.  This function is called at
  53.                               various check points, which have been
  54.                               hard coded into the UIL compiler.  The
  55.                               status_update_delay argument in
  56.                               command_desc specifies the number of
  57.                               check points to be passed before the
  58.                               status_cb function is invoked.
  59.  
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 4/30/98)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      UUUUiiiillll((((3333XXXX))))                   UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV                   UUUUiiiillll((((3333XXXX))))
  71.  
  72.  
  73.  
  74.           _s_t_a_t_u_s__d_a_t_a         Specifies user data that is passed to
  75.                               the status callback function
  76.                               (status_cb). Note that this argument is
  77.                               not interpreted by the UIL compiler, and
  78.                               is used exclusively by the calling
  79.                               application.
  80.  
  81.  
  82.           The data structures UUUUiiiillll____ccccoooommmmmmmmaaaannnndddd____ttttyyyyppppeeee and
  83.           UUUUiiiillll____ccccoooommmmppppiiiilllleeee____ddddeeeesssscccc____ttttyyyyppppeeee are detailed below.
  84.  
  85.           typedef struct Uil_command_type {
  86.           char *source_file;
  87.               /* single source to compile */
  88.           char *resource_file; /* name of output file */
  89.           char *listing_file; /* name of listing file */
  90.           unsigned int *include_dir_count;
  91.               /* number of dirs. in include_dir */
  92.           char *((*include_dir) []);
  93.               /* dir. to search for include files */
  94.           unsigned listing_file_flag: 1;
  95.               /* produce a listing */
  96.           unsigned resource_file_flag: 1;
  97.               /* generate UID output */
  98.           unsigned machine_code_flag: 1;
  99.               /* generate machine code */
  100.           unsigned report_info_msg_flag: 1;
  101.               /* report info messages */
  102.           unsigned report_warn_msg_flag: 1;
  103.               /* report warnings */
  104.           unsigned parse_tree_flag: 1;
  105.               /* generate parse tree */
  106.           unsigned int status_update_delay;
  107.               /* number of times a status point is */
  108.               /* passed before calling status_cb */
  109.               /* function 0 means called every time */
  110.           char *database;
  111.               /* name of database file */
  112.           unsigned database_flag: 1;
  113.               /* read a new database file */
  114.           unsigned use_setlocale_flag: 1;
  115.               /* enable calls to setlocale */
  116.           };
  117.  
  118.           typedef struct Uil_compile_desc_type {
  119.           unsigned int compiler_version;
  120.               /* version number of compiler */
  121.           unsigned int data_version;
  122.               /* version number of structures */
  123.           char *parse_tree_root; /* parse tree output */
  124.           unsigned int message_count [Uil_k_max_status+1];
  125.           /* array of severity counts */
  126.  
  127.  
  128.  
  129.      Page 2                                          (printed 4/30/98)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      UUUUiiiillll((((3333XXXX))))                   UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV                   UUUUiiiillll((((3333XXXX))))
  137.  
  138.  
  139.  
  140.           };
  141.  
  142.  
  143.           Following is a description of the message callback function
  144.           specified by _m_e_s_s_a_g_e__c_b:
  145.  
  146.           UUUUiiiillll____ccccoooonnnnttttiiiinnnnuuuueeee____ttttyyyyppppeeee ((((*_m_e_s_s_a_g_e__c_b)))) ((((_m_e_s_s_a_g_e__d_a_t_a, _m_e_s_s_a_g_e__n_u_m_b_e_r,
  147.                     _s_e_v_e_r_i_t_y, _m_s_g__b_u_f_f_e_r, _s_r_c__b_u_f_f_e_r, _p_t_r__b_u_f_f_e_r, _l_o_c__b_u_f_f_e_r,
  148.                     _m_e_s_s_a_g_e__c_o_u_n_t))))
  149.                cccchhhhaaaarrrr      *_m_e_s_s_a_g_e__d_a_t_a;;;;
  150.                iiiinnnntttt       _m_e_s_s_a_g_e__n_u_m_b_e_r;;;;
  151.                iiiinnnntttt       _s_e_v_e_r_i_t_y;;;;
  152.                cccchhhhaaaarrrr      *_m_s_g__b_u_f_f_e_r,,,, *_s_r_c__b_u_f_f_e_r;;;;
  153.                cccchhhhaaaarrrr      *_p_t_r__b_u_f_f_e_r,,,, *_l_o_c__b_u_f_f_e_r;;;;
  154.                iiiinnnntttt       _m_e_s_s_a_g_e__c_o_u_n_t[[[[]]]];;;;
  155.  
  156.  
  157.           Specifies a callback function that UIL invokes instead of
  158.           printing an error message when the compiler encounters an
  159.           error in the UIL source.  The callback should return one of
  160.           these values:
  161.  
  162.  
  163.           UUUUiiiillll____kkkk____tttteeeerrrrmmmmiiiinnnnaaaatttteeee     Tells UIL to terminate processing of the
  164.                               source file.
  165.  
  166.           UUUUiiiillll____kkkk____ccccoooonnnnttttiiiinnnnuuuueeee      Tells UIL to continue processing the
  167.                               source file.
  168.  
  169.  
  170.           Following are the arguments:
  171.  
  172.  
  173.           _m_e_s_s_a_g_e__d_a_t_a        Data supplied by the application as the
  174.                               _m_e_s_s_a_g_e__d_a_t_a argument to the UUUUiiiillll
  175.                               function.  UIL does not interpret this
  176.                               data in any way; it just passes it to
  177.                               the callback.
  178.  
  179.           _m_e_s_s_a_g_e__n_u_m_b_e_r      An index into a table of error messages
  180.                               and severities, for internal use by UIL.
  181.  
  182.           _s_e_v_e_r_i_t_y            An integer that indicates the severity
  183.                               of the error.  The possible values are
  184.                               the status constants returned by the UUUUiiiillll
  185.                               function.  See the "RETURN VALUE"
  186.                               section below.
  187.  
  188.           _m_s_g__b_u_f_f_e_r          A string that describes the error.
  189.  
  190.           _s_r_c__b_u_f_f_e_r          A string consisting of the source line
  191.                               where the error occurred.  This is not
  192.  
  193.  
  194.  
  195.      Page 3                                          (printed 4/30/98)
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      UUUUiiiillll((((3333XXXX))))                   UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV                   UUUUiiiillll((((3333XXXX))))
  203.  
  204.  
  205.  
  206.                               always available; the argument is then
  207.                               NULL.
  208.  
  209.           _p_t_r__b_u_f_f_e_r          A string consisting of whitespace and a
  210.                               printing character in the character
  211.                               position corresponding to the column of
  212.                               the source line where the error
  213.                               occurred.  This string may be printed
  214.                               beneath the source line to provide a
  215.                               visual indication of the column where
  216.                               the error occurred.  This is not always
  217.                               available; the argument is then NULL.
  218.  
  219.           _l_o_c__b_u_f_f_e_r          A string identifying the line number and
  220.                               file of the source line where the error
  221.                               occurred.  This is not always available;
  222.                               the argument is then NULL.
  223.  
  224.           _m_e_s_s_a_g_e__c_o_u_n_t       An array of integers containing the
  225.                               number of diagnostic messages issued
  226.                               thus far for each severity level.  To
  227.                               find the number of messages issued for
  228.                               the current severity level, use the
  229.                               _s_e_v_e_r_i_t_y argument as the index into this
  230.                               array.
  231.  
  232.  
  233.           Following is a description of the status callback function
  234.           specified by _s_t_a_t_u_s__c_b:
  235.  
  236.           UUUUiiiillll____ccccoooonnnnttttiiiinnnnuuuueeee____ttttyyyyppppeeee ((((*_s_t_a_t_u_s__c_b)))) ((((_s_t_a_t_u_s__d_a_t_a, _p_e_r_c_e_n_t__c_o_m_p_l_e_t_e,
  237.                     _l_i_n_e_s__p_r_o_c_e_s_s_e_d, _c_u_r_r_e_n_t__f_i_l_e, _m_e_s_s_a_g_e__c_o_u_n_t))))
  238.                cccchhhhaaaarrrr      *_s_t_a_t_u_s__d_a_t_a;;;;
  239.                iiiinnnntttt       _p_e_r_c_e_n_t__c_o_m_p_l_e_t_e;;;;
  240.                iiiinnnntttt       _l_i_n_e_s__p_r_o_c_e_s_s_e_d;;;;
  241.                cccchhhhaaaarrrr      *_c_u_r_r_e_n_t__f_i_l_e;;;;
  242.                iiiinnnntttt       _m_e_s_s_a_g_e__c_o_u_n_t[[[[]]]];;;;
  243.  
  244.  
  245.           Specifies a callback function that is invoked to allow X
  246.           applications to service X events such as updating the
  247.           screen.  The callback should return one of these values:
  248.  
  249.  
  250.           UUUUiiiillll____kkkk____tttteeeerrrrmmmmiiiinnnnaaaatttteeee     Tells UIL to terminate processing of the
  251.                               source file.
  252.  
  253.           UUUUiiiillll____kkkk____ccccoooonnnnttttiiiinnnnuuuueeee      Tells UIL to continue processing the
  254.                               source file.
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.      Page 4                                          (printed 4/30/98)
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.      UUUUiiiillll((((3333XXXX))))                   UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV                   UUUUiiiillll((((3333XXXX))))
  269.  
  270.  
  271.  
  272.           Following are the arguments:
  273.  
  274.  
  275.           _s_t_a_t_u_s__d_a_t_a         Data supplied by the application as the
  276.                               _s_t_a_t_u_s__d_a_t_a argument to the UUUUiiiillll
  277.                               function.  UIL does not interpret this
  278.                               data in any way; it just passes it to
  279.                               the callback.
  280.  
  281.           _p_e_r_c_e_n_t__c_o_m_p_l_e_t_e    An integer indicating what percentage of
  282.                               the current source file has been
  283.                               processed so far.
  284.  
  285.           _l_i_n_e_s__p_r_o_c_e_s_s_e_d     An integer indicating how many lines of
  286.                               the current source file have been read
  287.                               so far.
  288.  
  289.           _c_u_r_r_e_n_t__f_i_l_e        A string containing the pathname of the
  290.                               current source file.
  291.  
  292.           _m_e_s_s_a_g_e__c_o_u_n_t       An array of integers containing the
  293.                               number of diagnostic messages issued
  294.                               thus far for each severity level.  To
  295.                               find the number of messages issued for a
  296.                               given severity level, use the severity
  297.                               level as the index into this array.  The
  298.                               possible severity levels are the status
  299.                               constants returned by the UUUUiiiillll function.
  300.                               See the "RETURN VALUE" section below.
  301.  
  302.  
  303.      RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
  304.           This function returns one of these status return constants:
  305.  
  306.  
  307.           UUUUiiiillll____kkkk____ssssuuuucccccccceeeessssssss____ssssttttaaaattttuuuussss     The operation succeeded.
  308.  
  309.           UUUUiiiillll____kkkk____iiiinnnnffffoooo____ssssttttaaaattttuuuussss        The operation succeeded, and an
  310.                                    informational message is returned.
  311.  
  312.           UUUUiiiillll____kkkk____wwwwaaaarrrrnnnniiiinnnngggg____ssssttttaaaattttuuuussss     The operation succeeded, and a
  313.                                    warning message is returned.
  314.  
  315.           UUUUiiiillll____kkkk____eeeerrrrrrrroooorrrr____ssssttttaaaattttuuuussss       The operation failed due to an
  316.                                    error.
  317.  
  318.           UUUUiiiillll____kkkk____sssseeeevvvveeeerrrreeee____ssssttttaaaattttuuuussss      The operation failed due to an
  319.                                    error.
  320.  
  321.  
  322.      RRRREEEELLLLAAAATTTTEEEEDDDD IIIINNNNFFFFOOOORRRRMMMMAAAATTTTIIIIOOOONNNN
  323.           UUUUiiiillllDDDDuuuummmmppppSSSSyyyymmmmbbbboooollllTTTTaaaabbbblllleeee((((3333XXXX)))) and uuuuiiiillll((((1111XXXX)))).
  324.  
  325.  
  326.  
  327.      Page 5                                          (printed 4/30/98)
  328.  
  329.  
  330.  
  331.